package com.carkeeper.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carkeeper.pojo.EmployeePO;
import org.apache.ibatis.annotations.*;

/**
 * @version : 1.0
 * @outhor : zwk
 * @data : Create in 2020-05-27
 * @description :
 */
@Mapper
public interface EmployeeMapper extends BaseMapper<EmployeePO> {
    @Results(id = "employeeMapper",value = {
            @Result(property = "department",column = "department_id",one = @One(select = "com.carkeeper.mapper.DepartmentMapper.selectById")),
            @Result(property = "departmentId",column = "department_id"),
    })
    @Select("select * from tb_employee where id=#{id}")
    EmployeePO findById(Long id);
}
